package com.itheima.service;

import com.itheima.dao.ArticleDao;
import com.itheima.pojo.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ArticleService {
    @Autowired
    ArticleDao articleDao;
    public Article get(String id) {

        return articleDao.selectById(id);
    }

    public void add(Article article) {
        articleDao.insert(article);
    }
}
